import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import piniaPersist from 'pinia-plugin-persist'

// 引入所有图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


//创建pinia实例
const pinia = createPinia()
// 将插件添加到 Pinia
pinia.use(piniaPersist)
const app = createApp(App).use(router).use(ElementPlus).use(pinia).mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
